home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
system
/
bootslow.zip
/
SOURCE.ZIP
/
MKBOOT.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-08-06
|
2KB
|
89 lines
;
;; SlowDown for self-booting software
;;
;; BOOTSLOW
;;
;; Copyright 1991 Alexander R. Pruss
;;
;; May be freely distributed, modified and used provided that no copyright
;; messages are removed, and this sentence together with the next two are
;; always included in unmodified form. If you like this program a lot, you are
;; invited to show your appreciation by making a tax-deductible donation to
;; the Pro-Life or Anti-Abortion movement, but are under no obligation, moral
;; or otherwise to do so (especially if you disagree with the goals of this
;; movement.) There is no warranty; use at own risk.
;
include macros.inc
c segment
org 100h
BEGIN:
assume CS:c,DS:c
Puts copyright
mov ax,OpenRDOnly
mov dx,offset filename
int 21h
jc openerror
mov bx,ax
mov ah,ReadHandle
mov cx,512
mov dx,offset bootsec
int 21h
pushf
mov ah,CloseHandle
int 21h
popf
jc openerror
Puts drive_q
g:
DOSGetch
or al,TOLOWER
cmp al,'a'
jb g
cmp al,'z'
ja g
sub al,'a'
mov dl,al
push ds
pop es
mov ax,0301h
mov cx,0001h
Clear dh
mov bx,offset bootsec
int 13h
jc diskerror
Puts done
mov ax,4c00h
int 21h
openerror:
Puts cantopen
mov ax,4c01h
int 21h
diskerror:
Puts i13error
mov ax,4c02h
int 21h
_puts proc near
top:
mov bx,1
mov dx,si
mov ah,WriteHandle
int 21h
ret
_puts endp
String copyright, <'Interrupt table recorder.', CR,LF, '(C) Copyright 1991 Alexander Pruss', CR,LF>
String cantopen, <'Error reading bootsec.bin.',CR,LF>
String drive_q, <'Choose physical floppy drive to save boot sector to: (A,B,etc.)', CR,LF>
String i13error, <'Low level disk error.',CR,LF>
String done, <'Done!',CR,LF>
filename db 'bootsec.bin',00
bootsec:
c ends
end BEGIN